package com.cq.hd.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cq.hd.product.api.dto.ActiveLabelDto;
import com.cq.hd.product.po.TbActiveLabelPo;

import java.util.List;
import java.util.Map;

public interface TbActiveLabelService extends IService<TbActiveLabelPo> {

    void saveActiveLabels(Long activeId, List<Long> labelIds);

    List<ActiveLabelDto> getActiveLabels(Long activeId);

    /**
     * 统计标签被引用的次数
     *
     * @param labelIds 标签ids
     * @return <label_id, reference_count>
     */
    Map<Long, Integer> getLabelReferenceCounts(List<Long> labelIds);

}
